<html>
<head>
	<meta charset="utf-8">
	<title></title>
	
	<script type="text/javascript">
		// var arr=new Array(2);
		// arr[3]=10;
		// alert(arr[3]);
		// for(var i=0;i<arr.length;i++){
		// 	if(arr[i]>arr[i+1]){
		// 		var temp = arr[i];
		// 		arr[i]=arr[i+1];
		// 		arr[i+1]=temp;
		// 	}	
		// 	document.write(arr[i]+"<");
		// }
		
		
		

		function num(){
			var temp;
			for(var i=0;i<arr.length;i++){
				for (var j = 0; j < arr.length- i -1 ; j++) {
					if (arr[j] < arr[j + 1]) {
					temp = arr[j];
					arr[j] = arr[j + 1];
					arr[j + 1] = temp;
					}
			    }
			}
		}
		var arr = [1,4,9,5,6,0,20,-5,100];
		num(arr);
		document.write(arr+"<br/>");
		 
		var box = [1,21,25,14,56,85];
		document.write(box.join('__'));
		var len = box.push(12,14,16);
		document.write(len+"<br/>");
		var len = box.pop();
		var aaa= box.unshift("小皇帝");
		document.write(box+"<br/>");
		var fan=box.reverse();
		document.write(box+"<br/>");


		function demo(a,b){
			return b-a;
		}
		var c = new Array(1,15,2,4,7);
		var str = c.sort(demo);

		document.write(c+"<br/>");
		document.write(str+"<br/>");




		var box3=[1,2,3,4,5,6,7];
		var str1=box3.slice(2,5);
		document.write(str1+"<br/>");
		arr[Math.random()];
		document.write(Math.random()*5+"<br/>");
	</script>
</head>
<body>

</body>
</html>